package global
{
	//与网页通信
	
	import flash.external.*;
	
	import libs.json.JSON;
	public class HtmlConnect
	{
		public function HtmlConnect()
		{
		}
		public static function get loginInfo():Object
		{
			var jsonStr:String  = String(ExternalInterface.call("loginInfo"));
//			var jsonStr:String  = '{"ip":"192.168.2.137", "port":8081, "accounts":"sunbo", "password":"19840121"}';
			return JSON.decode(jsonStr);
		}
		public static function notifyServerLoadEnd():void
		{
			ExternalInterface.call("enableload");
		}
		
		public static function getRoomList(data:Object):Object
		{
			var jsonStr:String  = String(data);
			return JSON.decode(jsonStr);
		}
		
		public static function getValidateurl():String
		{
			var jsonStr:String  = String(ExternalInterface.call("getValidateurl"));
			return jsonStr;
		}
		
		
	}
}